package com.chen.blue.domain.dto.system;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * Created By CLT On 2024/4/29.
 */
@SuppressWarnings("all")
@Getter
@Setter
@ToString
@ApiModel("菜单添加参数")
public class MenuDto implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 菜单名称
     */
    @Length(max = 50, message = "菜单名称长度不能超过50")
    @NotBlank(message = "菜单名称不能为空")
    @ApiModelProperty(value = "菜单名称", required = true)
    private String name;

    /**
     * 菜单类型
     */
    @NotNull(message = "菜单类型不能为空")
    @ApiModelProperty(value = "菜单类型（1目录2菜单3接口）", required = true)
    private Integer type;

    /**
     * 父菜单ID
     */
    @NotNull(message = "父菜单ID不能为空")
    @ApiModelProperty(value = "父菜单ID", required = true)
    private Long parentId;

    /**
     * 菜单图标
     */
    @ApiModelProperty(value = "菜单图标")
    private String icon;

    /**
     * 组件路径
     */
    @ApiModelProperty(value = "组件路径")
    private String component;

    /**
     * 权限标识
     */
    @ApiModelProperty(value = "权限标识")
    private String permission;

    /**
     * 路由地址
     */
    @Length(max = 200, message = "路由地址长度不能超过200")
    @NotBlank(message = "路由地址不能为空")
    @ApiModelProperty(value = "路由地址", required = true)
    private String path;

    /**
     * 显示顺序
     */
    @NotNull(message = "显示顺序不能为空")
    @ApiModelProperty(value = "显示顺序", required = true)
    private Integer sort;

    /**
     * 菜单状态
     */
    @NotNull(message = "菜单状态不能为空")
    @ApiModelProperty(value = "菜单状态", required = true)
    private Boolean status;

    /**
     * 是否可见
     */
    @NotNull(message = "是否可见不能为空")
    @ApiModelProperty(value = "是否可见", required = true)
    private Boolean visible;

    /**
     * 是否外链
     */
    @NotNull(message = "是否外链不能为空")
    @ApiModelProperty(value = "是否外链", required = true)
    private Boolean isFrame;

    /**
     * 路由参数
     */
    @ApiModelProperty(value = "路由参数")
    private String query;

    /**
     * 是否缓存
     */
    @NotNull(message = "是否缓存不能为空")
    @ApiModelProperty(value = "是否缓存", required = true)
    private Boolean keepAlive;

    /**
     * 创建者
     */
    private String creator;

    /**
     * 更新者
     */
    private String updater;

}
